package com.dragon.mmochat.model;

import java.io.Serializable;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

//比武请求
public class MmochatPkRequest implements Serializable {
	private static final long serialVersionUID = -399483750942815715L;
	private static MmochatSerial serial = new MmochatSerial();
	private int id;
	// roleId->意见;
	private Map<Integer, Boolean> agreeMap = new ConcurrentHashMap<Integer, Boolean>();

	public MmochatPkRequest() {
		id = serial.addAndGetSerialId();
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public Map<Integer, Boolean> getAgreeMap() {
		return agreeMap;
	}

	public void setAgreeMap(Map<Integer, Boolean> agreeMap) {
		this.agreeMap = agreeMap;
	}

	public boolean isAllAgree() {
		for (Boolean v : agreeMap.values()) {
			if (!v) {
				return false;
			}
		}
		return true;
	}
}
